package com.letou.ls.uitl;

import com.letou.ls.mode.AppConfigInfo;

import android.content.Context;
import android.text.TextUtils;
import android.util.Log;

public class AppConfigManager {
    
    
    private static AppConfigManager instance;
    private Context mCtx;
    
    private AppConfigInfo mAppConfigInfo;


    public AppConfigManager(Context mCtx) {
        this.mCtx = mCtx.getApplicationContext();
    }
    
    public static AppConfigManager getInstance(Context ctx) {
        if (instance == null) {
            instance = new AppConfigManager(ctx);
        }
        return instance;
    }

    public AppConfigInfo getAppConfigInfo() {
        return mAppConfigInfo;
    }

    public void initAppsettingConfigs(String lotteryCode) {
        if (mAppConfigInfo == null) {
            mAppConfigInfo = new AppConfigInfo();
        }
        mAppConfigInfo.setLotteryCode(lotteryCode);
        // 黑龙江快乐十分 only竖版
        if (TextUtils.equals(lotteryCode, Constant.LOTTERY_CODE_01)) {
            // -------------------------综合设置-----------------------------
            mAppConfigInfo.setScreenDirection(0);// 竖版 必选
            String key = lotteryCode + mAppConfigInfo.getScreenDirection();
            mAppConfigInfo.setQihao(true);// 期号必选
            // 前三直 开奖号码互斥
            mAppConfigInfo.setQisanzhi(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.QIANSANZHI_TYPE, true));// 为默认值
            mAppConfigInfo.setKaijianghaima(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.KAIJIANG_NUM_TYPE, true));// 非为默认值

            mAppConfigInfo.setKaijianghaimafenbu(true); // 开奖号码分布必选
            mAppConfigInfo.setQiansanfenbu(false);// 前三分布不可选
            mAppConfigInfo.setHezhi(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.HEZHI_TYPE, true));// 和值为默认值
            mAppConfigInfo.setKuadu(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.KUADU_TYPE, true));// 跨度为默认值

            mAppConfigInfo.setDahaogeshu(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.DAHAO_COUNT_TYPE, false));// 大号个数为非默认值
            mAppConfigInfo.setDanhaogeshu(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.DANHAO_COUNT_TYPE, false));// 单号个数为非默认值

            mAppConfigInfo.setTuijianhaoma(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.RECOMMED_NUM_TYPE, true));// 推荐号码为默认值

            // 2位 3位互斥
            mAppConfigInfo.setErwei(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.TWO_DIGITS_TYPE, false));// 2位为非默认值
            mAppConfigInfo.setSanwei(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.THREE_NUM_TYPE, true));// 3位为默认值

            mAppConfigInfo.setYilouzhi(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.MISSING_VALUES_TYPE, true));// 遗漏值为默认值
            mAppConfigInfo.setChuxiancishu(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.APPEAR_NUM_TYPE, true));// 出现次数为默认值

            mAppConfigInfo.setXianshizhexian(false);// 是否显示折线 不可选

        } else if (TextUtils.equals(lotteryCode, Constant.LOTTERY_CODE_02)) {// 黑龙江快乐麻将 only竖版
            // -------------------------综合设置-----------------------------
            mAppConfigInfo.setScreenDirection(0);// 竖版 必选
            String key = lotteryCode + mAppConfigInfo.getScreenDirection();
            mAppConfigInfo.setQihao(true);// 期号必选

            mAppConfigInfo.setQisanzhi(false);// 前三直 不可选
            mAppConfigInfo.setKaijianghaima(true);// 开奖号码 必选

            mAppConfigInfo.setKaijianghaimafenbu(true); // 开奖号码分布必选
            mAppConfigInfo.setQiansanfenbu(false);// 前三分布不可选
            mAppConfigInfo.setHezhi(false);// 和值不可选
            mAppConfigInfo.setKuadu(false);// 跨度不可选

            mAppConfigInfo.setDahaogeshu(false);// 大号个数 不可选
            mAppConfigInfo.setDanhaogeshu(false);// 单号个数不可选

            mAppConfigInfo.setTuijianhaoma(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.RECOMMED_NUM_TYPE, true));// 推荐号码为默认值

            // 2位 3位互斥
            mAppConfigInfo.setErwei(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.TWO_DIGITS_TYPE, false));// 2位为非默认值
            mAppConfigInfo.setSanwei(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.THREE_NUM_TYPE, true));// 3位为默认值

            mAppConfigInfo.setYilouzhi(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.MISSING_VALUES_TYPE, true));// 遗漏值为默认值
            mAppConfigInfo.setChuxiancishu(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.APPEAR_NUM_TYPE, true));// 出现次数为默认值

            mAppConfigInfo.setXianshizhexian(false);// 是否显示折线 不可选
        } else if (TextUtils.equals(lotteryCode, Constant.LOTTERY_CODE_03)) {// 黑龙江快乐十分麻将 only横版
            // -------------------------综合设置-----------------------------
            mAppConfigInfo.setScreenDirection(1);// 横版 必选
            String key = lotteryCode + mAppConfigInfo.getScreenDirection();
            mAppConfigInfo.setQihao(true);// 期号必选
            // 前三直 开奖号码 互斥
            mAppConfigInfo.setQisanzhi(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.QIANSANZHI_TYPE, true));// 前三直 为默认值
            mAppConfigInfo.setKaijianghaima(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.KAIJIANG_NUM_TYPE, false));// 开奖号码 为非默认值

            mAppConfigInfo.setKaijianghaimafenbu(true); // 开奖号码分布必选
            mAppConfigInfo.setQiansanfenbu(false);// 前三分布不可选
            mAppConfigInfo.setHezhi(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.HEZHI_TYPE, true));// 和值为默认值
            mAppConfigInfo.setKuadu(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.KUADU_TYPE, true));// 跨度为默认值

            mAppConfigInfo.setDahaogeshu(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.DAHAO_COUNT_TYPE, false));// 大号个数为非默认值
            mAppConfigInfo.setDanhaogeshu(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.DANHAO_COUNT_TYPE, false));// 单号个数为非默认值

            mAppConfigInfo.setTuijianhaoma(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.RECOMMED_NUM_TYPE, true));// 推荐号码为默认值

            // 2位 3位互斥
            mAppConfigInfo.setErwei(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.TWO_DIGITS_TYPE, false));// 2位为非默认值
            mAppConfigInfo.setSanwei(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.THREE_NUM_TYPE, true));// 3位为默认值

            mAppConfigInfo.setYilouzhi(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.MISSING_VALUES_TYPE, true));// 遗漏值为默认值
            mAppConfigInfo.setChuxiancishu(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.APPEAR_NUM_TYPE, true));// 出现次数为默认值

            mAppConfigInfo.setXianshizhexian(false);// 是否显示折线 不可选
        } else if (TextUtils.equals(lotteryCode, Constant.LOTTERY_CODE_04)) {// 黑龙江11选5 横版 / 竖版
            // -------------------------综合设置-----------------------------
            mAppConfigInfo.setScreenDirection(
                    PreferencesUtils.getInt(mCtx, AppShowSettingType.SCREEN_DIRECTION_TYPE, 1));// 横版
            String key = lotteryCode + mAppConfigInfo.getScreenDirection();
            Log.e("cc", "initAppsettingConfigs:key:" + key);
            mAppConfigInfo.setQihao(true);// 期号必选
            // 前三直 开奖号码 互斥
            mAppConfigInfo.setQisanzhi(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.QIANSANZHI_TYPE, true));// 前三直 为默认值
            mAppConfigInfo.setKaijianghaima(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.KAIJIANG_NUM_TYPE, false));// 开奖号码 为非默认值
            if (mAppConfigInfo.getScreenDirection() == 0) {// 竖版
                // 开奖号码分布 和前三分布 二者必须选择一项，不互斥
                // 如不选择“开奖号码分布”是，只选择了前三分布，则为前三直每个号码各自在单独11个数中的分布，如果二者都选择，则显示前三组三个数在11数中的分布情况
                mAppConfigInfo.setHezhi(AppSettingPreferencesUtils.getBoolean(mCtx,
                        key + AppShowSettingType.KAIJIANG_NUM_PLAN_TYPE, true));// 开奖号码分布 默认
                mAppConfigInfo.setKuadu(AppSettingPreferencesUtils.getBoolean(mCtx,
                        key + AppShowSettingType.QIANSAN_PLAN_TYPE, false));// 前三分布 非默认
                // 互斥条件为开奖号码分布
                mAppConfigInfo.setXianshizhexian(AppSettingPreferencesUtils.getBoolean(mCtx,
                        key + AppShowSettingType.BROKEN_LINE_TYPE, false));// 是否显示折线 非默认
            } else {
                mAppConfigInfo.setKaijianghaimafenbu(true); // 开奖号码分布必选
                mAppConfigInfo.setQiansanfenbu(true);// 前三分布不可选
                mAppConfigInfo.setXianshizhexian(true);// 是否显示折线 必选
            }

            mAppConfigInfo.setHezhi(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.HEZHI_TYPE, true));// 和值为默认值
            mAppConfigInfo.setKuadu(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.KUADU_TYPE, true));// 跨度为默认值

            mAppConfigInfo.setDahaogeshu(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.DAHAO_COUNT_TYPE, false));// 大号个数为非默认值
            mAppConfigInfo.setDanhaogeshu(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.DANHAO_COUNT_TYPE, false));// 单号个数为非默认值

            mAppConfigInfo.setTuijianhaoma(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.RECOMMED_NUM_TYPE, true));// 推荐号码为默认值

            // 2位 3位互斥
            mAppConfigInfo.setErwei(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.TWO_DIGITS_TYPE, false));// 2位为非默认值
            mAppConfigInfo.setSanwei(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.THREE_NUM_TYPE, true));// 3位为默认值

            mAppConfigInfo.setYilouzhi(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.MISSING_VALUES_TYPE, true));// 遗漏值为默认值
            mAppConfigInfo.setChuxiancishu(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.APPEAR_NUM_TYPE, true));// 出现次数为默认值
            
            
        }

    }
    
    public AppConfigInfo readAppSettingConfigs(String lotteryCode, int direction) {
        Log.e("cc", "readAppSettingConfigs:" + lotteryCode + ";direction:" + direction);
        AppConfigInfo mAppConfigInfo = new AppConfigInfo();
        mAppConfigInfo.setLotteryCode(lotteryCode);
        // 黑龙江快乐十分 only竖版
        if (TextUtils.equals(lotteryCode, Constant.LOTTERY_CODE_01)) {
            // -------------------------综合设置-----------------------------
            mAppConfigInfo.setScreenDirection(0);// 竖版 必选
            String key = lotteryCode + mAppConfigInfo.getScreenDirection();
            mAppConfigInfo.setQihao(true);// 期号必选
            // 前三直 开奖号码互斥
            mAppConfigInfo.setQisanzhi(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.QIANSANZHI_TYPE, true));// 为默认值
            mAppConfigInfo.setKaijianghaima(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.KAIJIANG_NUM_TYPE, false));// 非为默认值

            mAppConfigInfo.setKaijianghaimafenbu(true); // 开奖号码分布必选
            mAppConfigInfo.setQiansanfenbu(false);// 前三分布不可选
            mAppConfigInfo.setHezhi(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.HEZHI_TYPE, true));// 和值为默认值
            mAppConfigInfo.setKuadu(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.KUADU_TYPE, true));// 跨度为默认值

            mAppConfigInfo.setDahaogeshu(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.DAHAO_COUNT_TYPE, false));// 大号个数为非默认值
            mAppConfigInfo.setDanhaogeshu(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.DANHAO_COUNT_TYPE, false));// 单号个数为非默认值

            mAppConfigInfo.setTuijianhaoma(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.RECOMMED_NUM_TYPE, true));// 推荐号码为默认值

            // 2位 3位互斥
            mAppConfigInfo.setErwei(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.TWO_DIGITS_TYPE, false));// 2位为非默认值
            mAppConfigInfo.setSanwei(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.THREE_NUM_TYPE, true));// 3位为默认值

            mAppConfigInfo.setYilouzhi(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.MISSING_VALUES_TYPE, true));// 遗漏值为默认值
            mAppConfigInfo.setChuxiancishu(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.APPEAR_NUM_TYPE, true));// 出现次数为默认值

            mAppConfigInfo.setXianshizhexian(false);// 是否显示折线 不可选

        } else if (TextUtils.equals(lotteryCode, Constant.LOTTERY_CODE_02)) {// 黑龙江快乐麻将 only竖版
            // -------------------------综合设置-----------------------------
            mAppConfigInfo.setScreenDirection(0);// 竖版 必选
            String key = lotteryCode + mAppConfigInfo.getScreenDirection();
            mAppConfigInfo.setQihao(true);// 期号必选

            mAppConfigInfo.setQisanzhi(false);// 前三直 不可选
            mAppConfigInfo.setKaijianghaima(true);// 开奖号码 必选

            mAppConfigInfo.setKaijianghaimafenbu(true); // 开奖号码分布必选
            mAppConfigInfo.setQiansanfenbu(false);// 前三分布不可选
            mAppConfigInfo.setHezhi(false);// 和值不可选
            mAppConfigInfo.setKuadu(false);// 跨度不可选

            mAppConfigInfo.setDahaogeshu(false);// 大号个数 不可选
            mAppConfigInfo.setDanhaogeshu(false);// 单号个数不可选

            mAppConfigInfo.setTuijianhaoma(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.RECOMMED_NUM_TYPE, true));// 推荐号码为默认值

            // 2位 3位互斥
            mAppConfigInfo.setErwei(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.TWO_DIGITS_TYPE, false));// 2位为非默认值
            mAppConfigInfo.setSanwei(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.THREE_NUM_TYPE, true));// 3位为默认值

            mAppConfigInfo.setYilouzhi(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.MISSING_VALUES_TYPE, true));// 遗漏值为默认值
            mAppConfigInfo.setChuxiancishu(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.APPEAR_NUM_TYPE, true));// 出现次数为默认值

            mAppConfigInfo.setXianshizhexian(false);// 是否显示折线 不可选
        } else if (TextUtils.equals(lotteryCode, Constant.LOTTERY_CODE_03)) {// 黑龙江快乐十分麻将 only横版
            // -------------------------综合设置-----------------------------
            mAppConfigInfo.setScreenDirection(1);// 横版 必选
            String key = lotteryCode + mAppConfigInfo.getScreenDirection();
            mAppConfigInfo.setQihao(true);// 期号必选
            // 前三直 开奖号码 互斥
            mAppConfigInfo.setQisanzhi(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.QIANSANZHI_TYPE, true));// 前三直 为默认值
            mAppConfigInfo.setKaijianghaima(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.KAIJIANG_NUM_TYPE, false));// 开奖号码 为非默认值

            mAppConfigInfo.setKaijianghaimafenbu(true); // 开奖号码分布必选
            mAppConfigInfo.setQiansanfenbu(false);// 前三分布不可选
            mAppConfigInfo.setHezhi(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.HEZHI_TYPE, true));// 和值为默认值
            mAppConfigInfo.setKuadu(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.KUADU_TYPE, true));// 跨度为默认值

            mAppConfigInfo.setDahaogeshu(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.DAHAO_COUNT_TYPE, false));// 大号个数为非默认值
            mAppConfigInfo.setDanhaogeshu(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.DANHAO_COUNT_TYPE, false));// 单号个数为非默认值

            mAppConfigInfo.setTuijianhaoma(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.RECOMMED_NUM_TYPE, true));// 推荐号码为默认值

            // 2位 3位互斥
            mAppConfigInfo.setErwei(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.TWO_DIGITS_TYPE, false));// 2位为非默认值
            mAppConfigInfo.setSanwei(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.THREE_NUM_TYPE, true));// 3位为默认值

            mAppConfigInfo.setYilouzhi(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.MISSING_VALUES_TYPE, true));// 遗漏值为默认值
            mAppConfigInfo.setChuxiancishu(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.APPEAR_NUM_TYPE, true));// 出现次数为默认值

            mAppConfigInfo.setXianshizhexian(false);// 是否显示折线 不可选
        } else if (TextUtils.equals(lotteryCode, Constant.LOTTERY_CODE_04)) {// 黑龙江11选5 横版 / 竖版
            // -------------------------综合设置-----------------------------
            mAppConfigInfo.setScreenDirection(direction);// 横版
            String key = lotteryCode + direction;
            mAppConfigInfo.setQihao(true);// 期号必选
            // 前三直 开奖号码 互斥
            mAppConfigInfo.setQisanzhi(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.QIANSANZHI_TYPE, true));// 前三直 为默认值
            mAppConfigInfo.setKaijianghaima(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.KAIJIANG_NUM_TYPE, false));// 开奖号码 为非默认值
            if (mAppConfigInfo.getScreenDirection() == 0) {// 竖版
                // 开奖号码分布 和前三分布 二者必须选择一项，不互斥
                // 如不选择“开奖号码分布”是，只选择了前三分布，则为前三直每个号码各自在单独11个数中的分布，如果二者都选择，则显示前三组三个数在11数中的分布情况
                mAppConfigInfo.setHezhi(AppSettingPreferencesUtils.getBoolean(mCtx,
                        key + AppShowSettingType.KAIJIANG_NUM_PLAN_TYPE, true));// 开奖号码分布 默认
                mAppConfigInfo.setKuadu(AppSettingPreferencesUtils.getBoolean(mCtx,
                        key + AppShowSettingType.QIANSAN_PLAN_TYPE, false));// 前三分布 非默认
                // 互斥条件为开奖号码分布
                mAppConfigInfo.setXianshizhexian(AppSettingPreferencesUtils.getBoolean(mCtx,
                        key + AppShowSettingType.BROKEN_LINE_TYPE, false));// 是否显示折线 非默认
            } else {
                mAppConfigInfo.setKaijianghaimafenbu(true); // 开奖号码分布必选
                mAppConfigInfo.setQiansanfenbu(true);// 前三分布不可选
                mAppConfigInfo.setXianshizhexian(true);// 是否显示折线 必选
            }

            mAppConfigInfo.setHezhi(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.HEZHI_TYPE, true));// 和值为默认值
            mAppConfigInfo.setKuadu(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.KUADU_TYPE, true));// 跨度为默认值

            mAppConfigInfo.setDahaogeshu(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.DAHAO_COUNT_TYPE, false));// 大号个数为非默认值
            mAppConfigInfo.setDanhaogeshu(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.DANHAO_COUNT_TYPE, false));// 单号个数为非默认值

            mAppConfigInfo.setTuijianhaoma(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.RECOMMED_NUM_TYPE, true));// 推荐号码为默认值

            // 2位 3位互斥
            mAppConfigInfo.setErwei(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.TWO_DIGITS_TYPE, false));// 2位为非默认值
            mAppConfigInfo.setSanwei(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.THREE_NUM_TYPE, true));// 3位为默认值

            mAppConfigInfo.setYilouzhi(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.MISSING_VALUES_TYPE, true));// 遗漏值为默认值
            mAppConfigInfo.setChuxiancishu(AppSettingPreferencesUtils.getBoolean(mCtx,
                    key + AppShowSettingType.APPEAR_NUM_TYPE, true));// 出现次数为默认值
            
            
        }
        return mAppConfigInfo;
    }

    public AppConfigInfo initColorsettingConfigs() {
        if (mAppConfigInfo == null) {
            mAppConfigInfo = new AppConfigInfo();
        }

        mAppConfigInfo.setBg_color_danshu(
                CorlorSettingPreferencesUtils.getString(mCtx, "bg_color_danshu", "#ffffff"));
        mAppConfigInfo.setBg_color_shuangshu(
                CorlorSettingPreferencesUtils.getString(mCtx, "bg_color_shuangshu", "#ffffff"));
        mAppConfigInfo.setTitle_color_qihao(
                CorlorSettingPreferencesUtils.getString(mCtx, "title_color_qihao", "#ffffff"));
        mAppConfigInfo.setTitle_bg_color_qihao(
                CorlorSettingPreferencesUtils.getString(mCtx, "title_bg_color_qihao", "#3962b4"));
        mAppConfigInfo.setColor_qihao(
                CorlorSettingPreferencesUtils.getString(mCtx, "color_qihao", "#ffffff"));
        mAppConfigInfo.setBg_color_qihao(
                CorlorSettingPreferencesUtils.getString(mCtx, "bg_color_qihao", "#ffffff"));
        mAppConfigInfo.setTitle_color_qiansanzhi(
                CorlorSettingPreferencesUtils.getString(mCtx, "title_color_qiansanzhi", "#ffffff"));
        mAppConfigInfo.setTitle_bg_color_qiansanzhi(CorlorSettingPreferencesUtils.getString(mCtx,
                "title_bg_color_qiansanzhi", "#ffffff"));
        mAppConfigInfo.setColor_qiansanzhi(
                CorlorSettingPreferencesUtils.getString(mCtx, "color_qiansanzhi", "#ffffff"));
        mAppConfigInfo.setBg_color_qiansanzhi(
                CorlorSettingPreferencesUtils.getString(mCtx, "bg_color_qiansanzhi", "#ffffff"));
        
        mAppConfigInfo.setTitle_color_kaijiang(
                CorlorSettingPreferencesUtils.getString(mCtx, "title_color_kaijiang", "#ffffff"));
        mAppConfigInfo.setTitle_bg_color_kaijiang(CorlorSettingPreferencesUtils.getString(mCtx,
                "title_bg_color_kaijiang", "#ffffff"));
        mAppConfigInfo.setColor_kaijiang(
                CorlorSettingPreferencesUtils.getString(mCtx, "color_kaijiang", "#ffffff"));
        mAppConfigInfo.setBg_color_kaijiang(
                CorlorSettingPreferencesUtils.getString(mCtx, "bg_color_kaijiang", "#ffffff"));
        mAppConfigInfo.setDouble_bg_color_kaijiang(CorlorSettingPreferencesUtils.getString(mCtx,
                "double_bg_color_kaijiang", "#ffffff"));
        
        mAppConfigInfo.setTitle_color_qiansanfenbu(CorlorSettingPreferencesUtils.getString(mCtx,
                "title_color_qiansanfenbu", "#ffffff"));
        mAppConfigInfo.setTitle_bg_color_qiansanfenbu(CorlorSettingPreferencesUtils.getString(mCtx,
                "title_bg_color_qiansanfenbu", "#ffffff"));
        mAppConfigInfo.setColor_qiansanfenbu(
                CorlorSettingPreferencesUtils.getString(mCtx, "color_qiansanfenbu", "#ffffff"));
        mAppConfigInfo.setBg_color_qiansanfenbu(
                CorlorSettingPreferencesUtils.getString(mCtx, "bg_color_qiansanfenbu", "#ffffff"));
        mAppConfigInfo.setDouble_bg_color_qiansanfenbu(CorlorSettingPreferencesUtils.getString(mCtx,
                "double_bg_color_qiansanfenbu", "#ffffff"));
        mAppConfigInfo.setLine_color_qiansanfenbu(CorlorSettingPreferencesUtils.getString(mCtx,
                "line_color_qiansanfenbu", "#ffffff"));
        
        mAppConfigInfo.setTitle_color_tongjizhi(
                CorlorSettingPreferencesUtils.getString(mCtx, "title_color_tongjizhi", "#ffffff"));
        mAppConfigInfo.setTitle_bg_color_tongjizhi(CorlorSettingPreferencesUtils.getString(mCtx,
                "title_bg_color_tongjizhi", "#ffffff"));
        mAppConfigInfo.setColor_tongjizhi(
                CorlorSettingPreferencesUtils.getString(mCtx, "color_tongjizhi", "#ffffff"));
        mAppConfigInfo.setBg_color_tongjizhi(
                CorlorSettingPreferencesUtils.getString(mCtx, "bg_color_tongjizhi", "#ffffff"));

        mAppConfigInfo.setTitle_color_tuijian(
                CorlorSettingPreferencesUtils.getString(mCtx, "title_color_tuijian", "#ffffff"));
        mAppConfigInfo.setTitle_bg_color_tuijian(
                CorlorSettingPreferencesUtils.getString(mCtx, "title_bg_color_tuijian", "#ffffff"));
        mAppConfigInfo.setColor_tuijian(
                CorlorSettingPreferencesUtils.getString(mCtx, "color_tuijian", "#ffffff"));
        mAppConfigInfo.setBg_color_tuijian(
                CorlorSettingPreferencesUtils.getString(mCtx, "bg_color_tuijian", "#ffffff"));
        
        mAppConfigInfo.setLine_common_small(
                CorlorSettingPreferencesUtils.getBoolean(mCtx, "line_common_small", true));
        mAppConfigInfo.setLine_common_big(
                CorlorSettingPreferencesUtils.getBoolean(mCtx, "line_common_big", false));
        mAppConfigInfo.setLine_common_h(
                CorlorSettingPreferencesUtils.getString(mCtx, "line_common_h", "#ffffff"));
        mAppConfigInfo.setLine_common_v(
                CorlorSettingPreferencesUtils.getString(mCtx, "line_common_v", "#ffffff"));
        
        mAppConfigInfo.setLine_rect_small(
                CorlorSettingPreferencesUtils.getBoolean(mCtx, "line_rect_small", true));
        mAppConfigInfo.setLine_rect_big(
                CorlorSettingPreferencesUtils.getBoolean(mCtx, "line_rect_big", false));
        mAppConfigInfo.setLine_rect_h(
                CorlorSettingPreferencesUtils.getString(mCtx, "line_rect_h", "#ffffff"));
        mAppConfigInfo.setLine_rect_v(
                CorlorSettingPreferencesUtils.getString(mCtx, "line_rect_v", "#ffffff"));
        return mAppConfigInfo;
    }
}
